package inheritance;/*
 *  user:38917
 *  date:2025/5/4
 *  time:21:38
 */

public class Son extends Father {
    public String sonName;
    public int sonAge;
    public String weight;
    //
    public void sonTest(){
        this.fatherName = "father";
        this.fatherAge = 48;
        super.weight = "70kg";
        this.sonName = "son";
        this.sonAge = 18;
        this.weight = "60kg";
    }
    //
    public void sonPrint(){
        System.out.println(this.fatherName);
        System.out.println(this.fatherAge);
        System.out.println(super.weight);
        System.out.println(this.sonName);
        System.out.println(this.sonAge);
        System.out.println(this.weight);
    }
    //
    public Son(String fatherName, int fatherAge, String fatherWeight,
               String sonName, int sonAge, String sonWeight) {
        super(fatherName,fatherAge,fatherWeight);
        this.sonName = sonName;
        this.sonAge = sonAge;
        this.weight = sonWeight;
    }



    //
    public Son(){
        super();
        System.out.println("子类的无参构造方法");
    }
    //
    {
        System.out.println("子类的实例代码块");
    }
    //
    static {
        System.out.println("子类的静态代码块");
    }
}
